package com.cskaoyan.bean;

import com.cskaoyan.demo1.Interface3;

/**
 * @author stone
 * @date 2022/12/20 00:14
 */
public class EveryOne implements Interface3 {
    @Override
    public void method3(Object instance) {
        if (instance instanceof LifeCycleBean) {
            int num = ((LifeCycleBean) instance).getNum();
            num += 3;
            ((LifeCycleBean) instance).setNum(num);
        }
    }

    @Override
    public void method4(Object instance) {
        if (instance instanceof LifeCycleBean) {
            int num = ((LifeCycleBean) instance).getNum();
            num += 4;
            ((LifeCycleBean) instance).setNum(num);
        }
    }
}
